#include "Process.h"

Process::Process(unsigned int Id, unsigned int threadsNumber, unsigned int parentId,  unsigned long int priority, QString exeName, QObject *parent) : QObject(parent){
    this -> Id = Id;
    this -> threadsNumber = threadsNumber;
    this -> parentId = parentId;
    this -> priority = priority;
    this -> exeName = exeName;
}


Process::Process(PROCESSENTRY32 * process, QObject *parent) : QObject(parent){
    this -> Id = process -> th32ProcessID;
    this -> threadsNumber = process -> cntThreads;
    this -> parentId = process -> th32ParentProcessID;
    this -> priority = process -> pcPriClassBase;
    this -> exeName = QString((QChar*) process -> szExeFile);
}



Process::Process(Process * process){
    this -> Id = process -> getId();
    this -> threadsNumber = process -> getThreadsNumber();
    this -> parentId = process -> getParentId();
    this -> priority = process -> getPriority();
    this -> exeName = process -> getExeName();
}



unsigned int Process::getId(){
    return this->Id;
}


unsigned int Process::getThreadsNumber(){
    return this -> threadsNumber;
}

unsigned int Process::getParentId(){
    return this->parentId;
}

unsigned long int Process::getPriority(){
   return this->priority;
}

QString Process::getExeName(){
    return this -> exeName;
}
